﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.DataVisualization.Charting;
using System.Data;
using System.Collections;
using DashBoardNegocios;
using System.Data.Sql;
using System.Data.SqlTypes;
using System.Data.SqlClient;

namespace DashBoardInterfaz
{
    public partial class Bonds1 : System.Web.UI.Page
    {
        c_ControladorNegocios _Controlador;

        protected void Page_Load(object sender, EventArgs e)
        {
            _Controlador = c_ControladorNegocios.getInstance();
            DateTime fecha1 = new DateTime(2011,02,11,18,45,0);
            DateTime fecha2 = new DateTime(2011,02,11,19,07,0);
            SqlDataReader data = _Controlador._obtInfoBonoRendimiento("30-Yr T-Bond", fecha1, fecha2);
            // Set series members names for the X and Y values 
            bond30YrChart.DataSource = data;
            bond30YrChart.Series.Add("Series 1");
            bond30YrChart.Series["Series 1"].ChartType = SeriesChartType.Line;
            bond30YrChart.Series["Series 1"].ToolTip = "#VAL";  
            bond30YrChart.Series["Series 1"].XValueMember = "HoraTransaccion";
            bond30YrChart.Series["Series 1"].YValueMembers = "Rendimiento";    
            bond30YrChart.DataBind();

        }
    }
}